package com.bookstore.mappers;

import com.bookstore.pojo.Order;
import com.bookstore.pojo.OrderItem;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderMapper {

    int deleteByPrimaryKey(String orderId);

    int insert(Order record);

    Order selectByPrimaryKey(Integer orderId);

    List<Order> selectAll();

    int updateByPrimaryKey(Order record);

    List<Order> selectOrderByUserId(@Param("userId") Integer userId);

    boolean saveOrder(Order order);

    int updateStatus(@Param("order") Order order);

    List<Order> getOrderList();

    List<Order> getOrderByUserId(@Param("userId") Integer userId);

    OrderItem getOrderItemOne(@Param("orderId")String orderId);
}